package test.designmode.buttonlistener2;

/**
 * Created by shuoGG on 2018/8/10
 *
 * 过渡用的例子, 方便理解buttonlistener3
 */
public class Main {

    public static void main(String[] args) throws Exception {
        JobPlayMusic job1 = new JobPlayMusic();
        JobShowPic job2 = new JobShowPic();
        EventHandler eventHandler = new EventHandler();
        eventHandler.addJob(job1, "playMusic", "小小粉刷匠");
        eventHandler.addJob(job2, "showPic", "toge.jpg");
        // 触发所有任务
        eventHandler.invokeAll();
    }

}
